home *** CD-ROM | disk | FTP | other *** search
/ Professional Companion for Windows 95 / WOW95PRO (Track 1).bin / merged.iso / wow95pro / utility / textpad / install.bat < prev    next >
Encoding:
DOS Batch File  |  1995-09-01  |  3.6 KB  |  131 lines

  1. @echo off
  2. REM  Installation script for TextPad.
  3. REM  Must be run from the source diskette or directory.
  4. REM  The first argument must be 16 or 32, specifying the edition.
  5. REM  Optionally takes the installation directory as its 2nd arg.
  6.  
  7. :chekenv
  8. set FILLER=123456789012345678901234567890
  9. if %FILLER% == 123456789012345678901234567890 goto getedition
  10. @echo Increase environment space before continuing
  11. goto end
  12.  
  13. :getedition
  14. set FILLER=
  15. REM  Determine which edition to install.
  16. if "%1" == "16" goto install16
  17. if "%1" == "32" goto install32
  18.  
  19. @echo Usage: INSTALL 16 [drive:directory]
  20. @echo    or: INSTALL 32 [drive:directory]
  21. goto end
  22.  
  23. :install16
  24. set EDITION=16
  25. set SYSDIR=SYSTEM
  26. goto windir
  27.  
  28. :install32
  29. set EDITION=32
  30. set SYSDIR=SYSTEM32
  31.  
  32. :windir
  33.  
  34. REM See if we can determine the Windows installation directory.
  35. if not "%WINDIR%" == "" goto instdir
  36. if exist c:\windows\win.ini goto win16
  37. @echo Cannot determine Windows installation directory.
  38. @echo Set environment variable WINDIR and start again.
  39. goto end
  40.  
  41. :win16
  42. set WINDIR=C:\WINDOWS
  43. set SYSDIR=SYSTEM
  44.  
  45. :instdir
  46. @echo Installing the %EDITION%-bit edition of TextPad
  47. if "%2" == "" goto default
  48. set destdir=%2
  49. goto makedir
  50.  
  51. :default
  52. set destdir=C:\TEXTPAD
  53.  
  54. :makedir
  55. mkdir %destdir%
  56.  
  57. REM --- Copy files to the installation directory.
  58. @echo in the directory: %destdir% ...
  59. @echo readme.txt...
  60. copy readme.txt %destdir%
  61. if not exist %destdir%\readme.txt goto copyerr
  62. @echo license.txt...
  63. copy license.txt %destdir%
  64. if not exist %destdir%\license.txt goto copyerr
  65. @echo register.txt...
  66. copy register.txt %destdir%
  67. if not exist %destdir%\register.txt goto copyerr
  68. @echo txtpad%EDITION%.exe...
  69. copy txtpad%EDITION%.exe %destdir%
  70. if not exist %destdir%\txtpad%EDITION%.exe goto copyerr
  71. @echo textpad.hlp...
  72. copy textpad.hlp %destdir%
  73. if not exist %destdir%\textpad.hlp goto copyerr
  74. @echo txtpad%EDITION%.reg...
  75. copy txtpad%EDITION%.reg %destdir%
  76. if not exist %destdir%\txtpad%EDITION%.reg goto copyerr
  77. @echo ddeopn%EDITION%.exe...
  78. copy ddeopn%EDITION%.exe %destdir%
  79. if not exist %destdir%\ddeopn%EDITION%.exe goto copyerr
  80.  
  81. if not exist textpad.lic goto dependents
  82. @echo textpad.lic...
  83. copy textpad.lic %destdir%
  84. if not exist %destdir%\textpad.lic goto copyerr
  85.  
  86. :dependents
  87. if %EDITION% == 32 goto files32
  88.  
  89. REM  Files for the 16-bit edition only:
  90. @echo Copying txtpad.pif to %WINDIR%
  91. copy txtpad.pif %WINDIR%
  92. if not exist %WINDIR%\txtpad.pif goto copyerr
  93.  
  94. if exist %WINDIR%\system\ctl3dv2.dll goto done
  95. @echo Copying ctl3dv2.dll to %WINDIR%\SYSTEM
  96. copy ctl3dv2.dll %WINDIR%\SYSTEM\ctl3dv2.dll
  97. if not exist %WINDIR%\SYSTEM\ctl3dv2.dll goto copyerr
  98. goto done
  99.  
  100. :files32
  101. REM  Files for the 32-bit edition only:
  102. @echo ut16.dll...
  103. copy ut16.dll %destdir%
  104. if not exist %destdir%\ut16.dll goto copyerr
  105. @echo ut32.dll...
  106. copy ut32.dll %destdir%
  107. if not exist %destdir%\ut32.dll goto copyerr
  108.  
  109. if exist %WINDIR%\%SYSDIR%\ctl3d32.dll goto done
  110. @echo Copying ctl3d32.dll to %WINDIR%\%SYSDIR%
  111. copy ctl3d32.dll %WINDIR%\%SYSDIR%\ctl3d32.dll
  112. if not exist %WINDIR%\%SYSDIR%\ctl3d32.dll goto copyerr
  113.  
  114. :done
  115. @echo ---------------------------------------------------------
  116. @echo TextPad has been successfully installed in %destdir%
  117. @echo Please read the file README.TXT before starting use.
  118. @echo Use Program Manager to add %destdir%\TXTPAD%EDITION%.EXE
  119. @echo to a program group.
  120. @echo ---------------------------------------------------------
  121. goto end
  122.  
  123. :copyerr
  124. @echo File copy error, abandoning installation.
  125. @echo Correct the problem and reinstall TextPad.
  126.  
  127. :end
  128. set WINDIR=
  129. set SYSDIR=
  130. set EDITION=
  131.